package com.vol.miyao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.vol.entity.TData;
import com.vol.entity.Operatelog;
import com.vol.mapper.OperatelogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OperatelogService {

    @Autowired
    private OperatelogMapper operatelogMapper;

    public TData<List<Operatelog>> GetList(int topNum){
        TData<List<Operatelog>> obj = new TData<>();
        LambdaQueryWrapper<Operatelog> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.last(" limit " + topNum);
        obj.Data = operatelogMapper.selectList(lambdaQueryWrapper);
        obj.Tag = 1;
        return obj;
    }

}
